package com.company.huisuo.biz.adapter

import android.view.LayoutInflater
import android.view.ViewGroup
import com.company.huisuo.base.BaseSingleAdapter
import com.company.huisuo.biz.bean.ArtistBean
import com.company.huisuo.databinding.ItemArtistListBinding
import com.company.huisuo.ext.loadCircleImg

/**
 * 我的K房-艺人列表
 */
class KRoomArtistListAdapter : BaseSingleAdapter<ArtistBean, ItemArtistListBinding>() {

    override val initViewBinding: (LayoutInflater, ViewGroup, Boolean) -> ItemArtistListBinding
        get() = ItemArtistListBinding::inflate

    override fun convert(
        holder: SingleViewHolder<ItemArtistListBinding>, position: Int, item: ArtistBean?
    ) {
        holder.binding.ivAvatar.loadCircleImg(item?.avatar ?: 0)
        holder.binding.tvName.text = item?.name
        holder.binding.tvDesc.text = item?.desc
    }
}